<?php
$tdatabrcs=array();
	$tdatabrcs[".NumberOfChars"]=80; 
	$tdatabrcs[".ShortName"]="brcs";
	$tdatabrcs[".OwnerID"]="";
	$tdatabrcs[".OriginalTable"]="brcs";


	
//	field labels
$fieldLabelsbrcs = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsbrcs["English"]=array();
	$fieldToolTipsbrcs["English"]=array();
	$fieldLabelsbrcs["English"]["id"] = "Id";
	$fieldToolTipsbrcs["English"]["id"] = "";
	$fieldLabelsbrcs["English"]["bank_id"] = "Bank";
	$fieldToolTipsbrcs["English"]["bank_id"] = "";
	$fieldLabelsbrcs["English"]["account_id"] = "Account";
	$fieldToolTipsbrcs["English"]["account_id"] = "";
	$fieldLabelsbrcs["English"]["ra_id"] = "Regional Authority";
	$fieldToolTipsbrcs["English"]["ra_id"] = "";
	$fieldLabelsbrcs["English"]["signature"] = "Signature";
	$fieldToolTipsbrcs["English"]["signature"] = "";
	$fieldLabelsbrcs["English"]["designation"] = "Designation";
	$fieldToolTipsbrcs["English"]["designation"] = "";
	$fieldLabelsbrcs["English"]["office_address"] = "Office Address";
	$fieldToolTipsbrcs["English"]["office_address"] = "";
	$fieldLabelsbrcs["English"]["residential_address"] = "Residential Address";
	$fieldToolTipsbrcs["English"]["residential_address"] = "";
	$fieldLabelsbrcs["English"]["place"] = "Place";
	$fieldToolTipsbrcs["English"]["place"] = "";
	$fieldLabelsbrcs["English"]["brc_date"] = "Date";
	$fieldToolTipsbrcs["English"]["brc_date"] = "";
	$fieldLabelsbrcs["English"]["ref_id"] = "Ref Id";
	$fieldToolTipsbrcs["English"]["ref_id"] = "";
	$fieldLabelsbrcs["English"]["bank_address"] = "Bank Address";
	$fieldToolTipsbrcs["English"]["bank_address"] = "";
	$fieldLabelsbrcs["English"]["account_address"] = "Account Address";
	$fieldToolTipsbrcs["English"]["account_address"] = "";
	$fieldLabelsbrcs["English"]["ra_address"] = "Regional Authority Address";
	$fieldToolTipsbrcs["English"]["ra_address"] = "";
	if (count($fieldToolTipsbrcs["English"])){
		$tdatabrcs[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Hong Kong S.A.R.)")
{
	$fieldLabelsbrcs["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldToolTipsbrcs["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldLabelsbrcs["Chinese (Hong Kong S.A.R.)"]["id"] = "Id";
	$fieldToolTipsbrcs["Chinese (Hong Kong S.A.R.)"]["id"] = "";
	$fieldLabelsbrcs["Chinese (Hong Kong S.A.R.)"]["bank_id"] = "Bank Id";
	$fieldToolTipsbrcs["Chinese (Hong Kong S.A.R.)"]["bank_id"] = "";
	$fieldLabelsbrcs["Chinese (Hong Kong S.A.R.)"]["account_id"] = "Account Id";
	$fieldToolTipsbrcs["Chinese (Hong Kong S.A.R.)"]["account_id"] = "";
	$fieldLabelsbrcs["Chinese (Hong Kong S.A.R.)"]["ra_id"] = "Ra Id";
	$fieldToolTipsbrcs["Chinese (Hong Kong S.A.R.)"]["ra_id"] = "";
	$fieldLabelsbrcs["Chinese (Hong Kong S.A.R.)"]["signature"] = "Signature";
	$fieldToolTipsbrcs["Chinese (Hong Kong S.A.R.)"]["signature"] = "";
	$fieldLabelsbrcs["Chinese (Hong Kong S.A.R.)"]["designation"] = "Designation";
	$fieldToolTipsbrcs["Chinese (Hong Kong S.A.R.)"]["designation"] = "";
	$fieldLabelsbrcs["Chinese (Hong Kong S.A.R.)"]["office_address"] = "Office Address";
	$fieldToolTipsbrcs["Chinese (Hong Kong S.A.R.)"]["office_address"] = "";
	$fieldLabelsbrcs["Chinese (Hong Kong S.A.R.)"]["residential_address"] = "Residential Address";
	$fieldToolTipsbrcs["Chinese (Hong Kong S.A.R.)"]["residential_address"] = "";
	$fieldLabelsbrcs["Chinese (Hong Kong S.A.R.)"]["place"] = "Place";
	$fieldToolTipsbrcs["Chinese (Hong Kong S.A.R.)"]["place"] = "";
	$fieldLabelsbrcs["Chinese (Hong Kong S.A.R.)"]["brc_date"] = "Brc Date";
	$fieldToolTipsbrcs["Chinese (Hong Kong S.A.R.)"]["brc_date"] = "";
	$fieldLabelsbrcs["Chinese (Hong Kong S.A.R.)"]["ref_id"] = "Ref Id";
	$fieldToolTipsbrcs["Chinese (Hong Kong S.A.R.)"]["ref_id"] = "";
	$fieldLabelsbrcs["Chinese (Hong Kong S.A.R.)"]["bank_address"] = "Bank Address";
	$fieldToolTipsbrcs["Chinese (Hong Kong S.A.R.)"]["bank_address"] = "";
	$fieldLabelsbrcs["Chinese (Hong Kong S.A.R.)"]["account_address"] = "Account Address";
	$fieldToolTipsbrcs["Chinese (Hong Kong S.A.R.)"]["account_address"] = "";
	$fieldLabelsbrcs["Chinese (Hong Kong S.A.R.)"]["ra_address"] = "Ra Address";
	$fieldToolTipsbrcs["Chinese (Hong Kong S.A.R.)"]["ra_address"] = "";
	if (count($fieldToolTipsbrcs["Chinese (Hong Kong S.A.R.)"])){
		$tdatabrcs[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Taiwan)")
{
	$fieldLabelsbrcs["Chinese (Taiwan)"]=array();
	$fieldToolTipsbrcs["Chinese (Taiwan)"]=array();
	$fieldLabelsbrcs["Chinese (Taiwan)"]["id"] = "Id";
	$fieldToolTipsbrcs["Chinese (Taiwan)"]["id"] = "";
	$fieldLabelsbrcs["Chinese (Taiwan)"]["bank_id"] = "Bank Id";
	$fieldToolTipsbrcs["Chinese (Taiwan)"]["bank_id"] = "";
	$fieldLabelsbrcs["Chinese (Taiwan)"]["account_id"] = "Account Id";
	$fieldToolTipsbrcs["Chinese (Taiwan)"]["account_id"] = "";
	$fieldLabelsbrcs["Chinese (Taiwan)"]["ra_id"] = "Ra Id";
	$fieldToolTipsbrcs["Chinese (Taiwan)"]["ra_id"] = "";
	$fieldLabelsbrcs["Chinese (Taiwan)"]["signature"] = "Signature";
	$fieldToolTipsbrcs["Chinese (Taiwan)"]["signature"] = "";
	$fieldLabelsbrcs["Chinese (Taiwan)"]["designation"] = "Designation";
	$fieldToolTipsbrcs["Chinese (Taiwan)"]["designation"] = "";
	$fieldLabelsbrcs["Chinese (Taiwan)"]["office_address"] = "Office Address";
	$fieldToolTipsbrcs["Chinese (Taiwan)"]["office_address"] = "";
	$fieldLabelsbrcs["Chinese (Taiwan)"]["residential_address"] = "Residential Address";
	$fieldToolTipsbrcs["Chinese (Taiwan)"]["residential_address"] = "";
	$fieldLabelsbrcs["Chinese (Taiwan)"]["place"] = "Place";
	$fieldToolTipsbrcs["Chinese (Taiwan)"]["place"] = "";
	$fieldLabelsbrcs["Chinese (Taiwan)"]["brc_date"] = "Brc Date";
	$fieldToolTipsbrcs["Chinese (Taiwan)"]["brc_date"] = "";
	$fieldLabelsbrcs["Chinese (Taiwan)"]["ref_id"] = "Ref Id";
	$fieldToolTipsbrcs["Chinese (Taiwan)"]["ref_id"] = "";
	$fieldLabelsbrcs["Chinese (Taiwan)"]["bank_address"] = "Bank Address";
	$fieldToolTipsbrcs["Chinese (Taiwan)"]["bank_address"] = "";
	$fieldLabelsbrcs["Chinese (Taiwan)"]["account_address"] = "Account Address";
	$fieldToolTipsbrcs["Chinese (Taiwan)"]["account_address"] = "";
	$fieldLabelsbrcs["Chinese (Taiwan)"]["ra_address"] = "Ra Address";
	$fieldToolTipsbrcs["Chinese (Taiwan)"]["ra_address"] = "";
	if (count($fieldToolTipsbrcs["Chinese (Taiwan)"])){
		$tdatabrcs[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="French")
{
	$fieldLabelsbrcs["French"]=array();
	$fieldToolTipsbrcs["French"]=array();
	$fieldLabelsbrcs["French"]["id"] = "Id";
	$fieldToolTipsbrcs["French"]["id"] = "";
	$fieldLabelsbrcs["French"]["bank_id"] = "Bank Id";
	$fieldToolTipsbrcs["French"]["bank_id"] = "";
	$fieldLabelsbrcs["French"]["account_id"] = "Account Id";
	$fieldToolTipsbrcs["French"]["account_id"] = "";
	$fieldLabelsbrcs["French"]["ra_id"] = "Ra Id";
	$fieldToolTipsbrcs["French"]["ra_id"] = "";
	$fieldLabelsbrcs["French"]["signature"] = "Signature";
	$fieldToolTipsbrcs["French"]["signature"] = "";
	$fieldLabelsbrcs["French"]["designation"] = "Designation";
	$fieldToolTipsbrcs["French"]["designation"] = "";
	$fieldLabelsbrcs["French"]["office_address"] = "Office Address";
	$fieldToolTipsbrcs["French"]["office_address"] = "";
	$fieldLabelsbrcs["French"]["residential_address"] = "Residential Address";
	$fieldToolTipsbrcs["French"]["residential_address"] = "";
	$fieldLabelsbrcs["French"]["place"] = "Place";
	$fieldToolTipsbrcs["French"]["place"] = "";
	$fieldLabelsbrcs["French"]["brc_date"] = "Brc Date";
	$fieldToolTipsbrcs["French"]["brc_date"] = "";
	$fieldLabelsbrcs["French"]["ref_id"] = "Ref Id";
	$fieldToolTipsbrcs["French"]["ref_id"] = "";
	$fieldLabelsbrcs["French"]["bank_address"] = "Bank Address";
	$fieldToolTipsbrcs["French"]["bank_address"] = "";
	$fieldLabelsbrcs["French"]["account_address"] = "Account Address";
	$fieldToolTipsbrcs["French"]["account_address"] = "";
	$fieldLabelsbrcs["French"]["ra_address"] = "Ra Address";
	$fieldToolTipsbrcs["French"]["ra_address"] = "";
	if (count($fieldToolTipsbrcs["French"])){
		$tdatabrcs[".isUseToolTips"]=true;
	}
}


	
	$tdatabrcs[".NCSearch"]=true;

	

$tdatabrcs[".shortTableName"] = "brcs";
$tdatabrcs[".nSecOptions"] = 0;
$tdatabrcs[".recsPerRowList"] = 1;	
$tdatabrcs[".tableGroupBy"] = "0";
$tdatabrcs[".mainTableOwnerID"] = "";
$tdatabrcs[".moveNext"] = 1;




$tdatabrcs[".showAddInPopup"] = false;

$tdatabrcs[".showEditInPopup"] = false;

$tdatabrcs[".showViewInPopup"] = false;


$tdatabrcs[".fieldsForRegister"] = array();

$tdatabrcs[".listAjax"] = true;

	$tdatabrcs[".audit"] = false;

	$tdatabrcs[".locking"] = false;
	
$tdatabrcs[".listIcons"] = true;
$tdatabrcs[".edit"] = true;
$tdatabrcs[".inlineEdit"] = true;
$tdatabrcs[".view"] = true;

$tdatabrcs[".exportTo"] = true;

$tdatabrcs[".printFriendly"] = true;

$tdatabrcs[".delete"] = true;

$tdatabrcs[".showSimpleSearchOptions"] = true;

$tdatabrcs[".showSearchPanel"] = true;


$tdatabrcs[".isUseAjaxSuggest"] = true;

$tdatabrcs[".rowHighlite"] = true;


// button handlers file names

$tdatabrcs[".addPageEvents"] = true;

$tdatabrcs[".arrKeyFields"][] = "id";

// use datepicker for search panel
$tdatabrcs[".isUseCalendarForSearch"] = true;

// use timepicker for search panel
$tdatabrcs[".isUseTimeForSearch"] = false;

$tdatabrcs[".isUseiBox"] = false;


$tdatabrcs[".useDetailsPreview"] = true;	

$tdatabrcs[".isUseInlineAdd"] = true;

$tdatabrcs[".isUseInlineEdit"] = true;
$tdatabrcs[".isUseInlineJs"] = $tdatabrcs[".isUseInlineAdd"] || $tdatabrcs[".isUseInlineEdit"];

$tdatabrcs[".allSearchFields"] = array();

$tdatabrcs[".globSearchFields"][] = "ref_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ref_id", $tdatabrcs[".allSearchFields"]))
{
	$tdatabrcs[".allSearchFields"][] = "ref_id";	
}
$tdatabrcs[".globSearchFields"][] = "bank_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("bank_id", $tdatabrcs[".allSearchFields"]))
{
	$tdatabrcs[".allSearchFields"][] = "bank_id";	
}
$tdatabrcs[".globSearchFields"][] = "bank_address";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("bank_address", $tdatabrcs[".allSearchFields"]))
{
	$tdatabrcs[".allSearchFields"][] = "bank_address";	
}
$tdatabrcs[".globSearchFields"][] = "account_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("account_id", $tdatabrcs[".allSearchFields"]))
{
	$tdatabrcs[".allSearchFields"][] = "account_id";	
}
$tdatabrcs[".globSearchFields"][] = "account_address";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("account_address", $tdatabrcs[".allSearchFields"]))
{
	$tdatabrcs[".allSearchFields"][] = "account_address";	
}
$tdatabrcs[".globSearchFields"][] = "ra_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ra_id", $tdatabrcs[".allSearchFields"]))
{
	$tdatabrcs[".allSearchFields"][] = "ra_id";	
}
$tdatabrcs[".globSearchFields"][] = "ra_address";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ra_address", $tdatabrcs[".allSearchFields"]))
{
	$tdatabrcs[".allSearchFields"][] = "ra_address";	
}
$tdatabrcs[".globSearchFields"][] = "signature";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("signature", $tdatabrcs[".allSearchFields"]))
{
	$tdatabrcs[".allSearchFields"][] = "signature";	
}
$tdatabrcs[".globSearchFields"][] = "designation";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("designation", $tdatabrcs[".allSearchFields"]))
{
	$tdatabrcs[".allSearchFields"][] = "designation";	
}
$tdatabrcs[".globSearchFields"][] = "office_address";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("office_address", $tdatabrcs[".allSearchFields"]))
{
	$tdatabrcs[".allSearchFields"][] = "office_address";	
}
$tdatabrcs[".globSearchFields"][] = "residential_address";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("residential_address", $tdatabrcs[".allSearchFields"]))
{
	$tdatabrcs[".allSearchFields"][] = "residential_address";	
}
$tdatabrcs[".globSearchFields"][] = "brc_date";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("brc_date", $tdatabrcs[".allSearchFields"]))
{
	$tdatabrcs[".allSearchFields"][] = "brc_date";	
}
$tdatabrcs[".globSearchFields"][] = "place";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("place", $tdatabrcs[".allSearchFields"]))
{
	$tdatabrcs[".allSearchFields"][] = "place";	
}


$tdatabrcs[".googleLikeFields"][] = "id";
$tdatabrcs[".googleLikeFields"][] = "ref_id";
$tdatabrcs[".googleLikeFields"][] = "bank_id";
$tdatabrcs[".googleLikeFields"][] = "bank_address";
$tdatabrcs[".googleLikeFields"][] = "account_id";
$tdatabrcs[".googleLikeFields"][] = "account_address";
$tdatabrcs[".googleLikeFields"][] = "ra_id";
$tdatabrcs[".googleLikeFields"][] = "ra_address";
$tdatabrcs[".googleLikeFields"][] = "signature";
$tdatabrcs[".googleLikeFields"][] = "designation";
$tdatabrcs[".googleLikeFields"][] = "office_address";
$tdatabrcs[".googleLikeFields"][] = "residential_address";
$tdatabrcs[".googleLikeFields"][] = "brc_date";
$tdatabrcs[".googleLikeFields"][] = "place";



$tdatabrcs[".advSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatabrcs[".allSearchFields"])) 
{
	$tdatabrcs[".allSearchFields"][] = "id";	
}
$tdatabrcs[".advSearchFields"][] = "ref_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ref_id", $tdatabrcs[".allSearchFields"])) 
{
	$tdatabrcs[".allSearchFields"][] = "ref_id";	
}
$tdatabrcs[".advSearchFields"][] = "bank_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("bank_id", $tdatabrcs[".allSearchFields"])) 
{
	$tdatabrcs[".allSearchFields"][] = "bank_id";	
}
$tdatabrcs[".advSearchFields"][] = "bank_address";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("bank_address", $tdatabrcs[".allSearchFields"])) 
{
	$tdatabrcs[".allSearchFields"][] = "bank_address";	
}
$tdatabrcs[".advSearchFields"][] = "account_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("account_id", $tdatabrcs[".allSearchFields"])) 
{
	$tdatabrcs[".allSearchFields"][] = "account_id";	
}
$tdatabrcs[".advSearchFields"][] = "account_address";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("account_address", $tdatabrcs[".allSearchFields"])) 
{
	$tdatabrcs[".allSearchFields"][] = "account_address";	
}
$tdatabrcs[".advSearchFields"][] = "ra_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ra_id", $tdatabrcs[".allSearchFields"])) 
{
	$tdatabrcs[".allSearchFields"][] = "ra_id";	
}
$tdatabrcs[".advSearchFields"][] = "ra_address";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ra_address", $tdatabrcs[".allSearchFields"])) 
{
	$tdatabrcs[".allSearchFields"][] = "ra_address";	
}
$tdatabrcs[".advSearchFields"][] = "signature";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("signature", $tdatabrcs[".allSearchFields"])) 
{
	$tdatabrcs[".allSearchFields"][] = "signature";	
}
$tdatabrcs[".advSearchFields"][] = "designation";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("designation", $tdatabrcs[".allSearchFields"])) 
{
	$tdatabrcs[".allSearchFields"][] = "designation";	
}
$tdatabrcs[".advSearchFields"][] = "office_address";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("office_address", $tdatabrcs[".allSearchFields"])) 
{
	$tdatabrcs[".allSearchFields"][] = "office_address";	
}
$tdatabrcs[".advSearchFields"][] = "residential_address";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("residential_address", $tdatabrcs[".allSearchFields"])) 
{
	$tdatabrcs[".allSearchFields"][] = "residential_address";	
}
$tdatabrcs[".advSearchFields"][] = "brc_date";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("brc_date", $tdatabrcs[".allSearchFields"])) 
{
	$tdatabrcs[".allSearchFields"][] = "brc_date";	
}
$tdatabrcs[".advSearchFields"][] = "place";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("place", $tdatabrcs[".allSearchFields"])) 
{
	$tdatabrcs[".allSearchFields"][] = "place";	
}

$tdatabrcs[".isTableType"] = "list";


	

$tdatabrcs[".isDisplayLoading"] = true;

$tdatabrcs[".isResizeColumns"] = false;

	$tdatabrcs[".subQueriesSupAccess"] = true;




$tdatabrcs[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdatabrcs[".strOrderBy"] = $gstrOrderBy;
	
$tdatabrcs[".orderindexes"] = array();

$tdatabrcs[".sqlHead"] = "SELECT id,  bank_id,  account_id,  ra_id,  signature,  designation,  office_address,  residential_address,  place,  brc_date,  ref_id,  \"\" AS bank_address,  \"\" AS account_address,  \"\" AS ra_address";
$tdatabrcs[".sqlFrom"] = "FROM brcs";
$tdatabrcs[".sqlWhereExpr"] = "";
$tdatabrcs[".sqlTail"] = "";

//fill array of tabs for edit page
$arrEditTabs = array();
	$tabFields = array();
	$tabFields[]="ref_id";
$arrEditTabs[] = array('tabId'=>'Invoice1',
					   'tabName'=>"Invoice",
					   'nType'=>'1',
					   'nOrder'=>1,
					   'tabGroup'=>0,
					   'arrFields'=> $tabFields,
					   'expandSec'=>1);
	$tabFields = array();
	$tabFields[]="bank_id";
	$tabFields[]="bank_address";
	$tabFields[]="account_id";
	$tabFields[]="account_address";
	$tabFields[]="ra_id";
	$tabFields[]="ra_address";
$arrEditTabs[] = array('tabId'=>'Companies1',
					   'tabName'=>"Companies",
					   'nType'=>'1',
					   'nOrder'=>3,
					   'tabGroup'=>0,
					   'arrFields'=> $tabFields,
					   'expandSec'=>1);
	$tabFields = array();
	$tabFields[]="signature";
	$tabFields[]="designation";
	$tabFields[]="office_address";
	$tabFields[]="residential_address";
	$tabFields[]="brc_date";
	$tabFields[]="place";
$arrEditTabs[] = array('tabId'=>'Commercials1',
					   'tabName'=>"Commercials",
					   'nType'=>'1',
					   'nOrder'=>10,
					   'tabGroup'=>0,
					   'arrFields'=> $tabFields,
					   'expandSec'=>1);
$tdatabrcs[".arrEditTabs"] = $arrEditTabs;

//fill array of tabs for add page
$arrAddTabs = array();
	$tabFields = array();
	$tabFields[] = "ref_id";
$arrAddTabs[] = array('tabId'=>'Invoice1',
					  'tabName'=>"Invoice",
					  'nType'=>'1',
					  'nOrder'=>1,
					  'tabGroup'=>0,
					  'arrFields'=> $tabFields,
					  'expandSec'=>1);
	$tabFields = array();
	$tabFields[] = "bank_id";
	$tabFields[] = "bank_address";
	$tabFields[] = "account_id";
	$tabFields[] = "account_address";
	$tabFields[] = "ra_id";
	$tabFields[] = "ra_address";
$arrAddTabs[] = array('tabId'=>'Companies1',
					  'tabName'=>"Companies",
					  'nType'=>'1',
					  'nOrder'=>3,
					  'tabGroup'=>0,
					  'arrFields'=> $tabFields,
					  'expandSec'=>1);
	$tabFields = array();
	$tabFields[] = "signature";
	$tabFields[] = "designation";
	$tabFields[] = "office_address";
	$tabFields[] = "residential_address";
	$tabFields[] = "brc_date";
	$tabFields[] = "place";
$arrAddTabs[] = array('tabId'=>'Commercials1',
					  'tabName'=>"Commercials",
					  'nType'=>'1',
					  'nOrder'=>10,
					  'tabGroup'=>0,
					  'arrFields'=> $tabFields,
					  'expandSec'=>1);
$tdatabrcs[".arrAddTabs"] = $arrAddTabs;


//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatabrcs[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatabrcs[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "id";
	$tdatabrcs[".Keys"] = $tableKeys;

//	id
	$fdata = array();
	$fdata["strName"] = "id";
	$fdata["ownerTable"] = "brcs";
		$fdata["Label"]="Id"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "id";
	
		$fdata["FullName"]= "id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		
		
		
		
		
		
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				
		
				
		
		
		
			$tdatabrcs["id"]=$fdata;
//	bank_id
	$fdata = array();
	$fdata["strName"] = "bank_id";
	$fdata["ownerTable"] = "brcs";
		$fdata["Label"]="Bank"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
	$fdata["autoCompleteFields"][] = array('masterF'=>"bank_address", 'lookupF'=>"full_addr");
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="company_name";
				$fdata["LookupTable"]="company_addresses";
	$fdata["LookupOrderBy"]="company_name";
							$fdata["LookupWhere"] = "category='Bank'";
										$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "bank_id";
	
		$fdata["FullName"]= "bank_id";
	
		
		
		
		
		
				$fdata["Index"]= 2;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatabrcs["bank_id"]=$fdata;
//	account_id
	$fdata = array();
	$fdata["strName"] = "account_id";
	$fdata["ownerTable"] = "brcs";
		$fdata["Label"]="Account"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
	$fdata["autoCompleteFields"][] = array('masterF'=>"account_address", 'lookupF'=>"full_addr");
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="company_name";
				$fdata["LookupTable"]="company_addresses";
	$fdata["LookupOrderBy"]="company_name";
							$fdata["LookupWhere"] = "category='Account'";
										$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "account_id";
	
		$fdata["FullName"]= "account_id";
	
		
		
		
		
		
				$fdata["Index"]= 3;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatabrcs["account_id"]=$fdata;
//	ra_id
	$fdata = array();
	$fdata["strName"] = "ra_id";
	$fdata["ownerTable"] = "brcs";
		$fdata["Label"]="Regional Authority"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
	$fdata["autoCompleteFields"][] = array('masterF'=>"ra_address", 'lookupF'=>"full_addr");
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="company_name";
				$fdata["LookupTable"]="company_addresses";
	$fdata["LookupOrderBy"]="company_name";
							$fdata["LookupWhere"] = "category='buyer'";
										$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "ra_id";
	
		$fdata["FullName"]= "ra_id";
	
		
		
		
		
		
				$fdata["Index"]= 4;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatabrcs["ra_id"]=$fdata;
//	signature
	$fdata = array();
	$fdata["strName"] = "signature";
	$fdata["ownerTable"] = "brcs";
		$fdata["Label"]="Signature"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "signature";
	
		$fdata["FullName"]= "signature";
	
		
		
		
		
		
				$fdata["Index"]= 5;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatabrcs["signature"]=$fdata;
//	designation
	$fdata = array();
	$fdata["strName"] = "designation";
	$fdata["ownerTable"] = "brcs";
		$fdata["Label"]="Designation"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "designation";
	
		$fdata["FullName"]= "designation";
	
		
		
		
		
		
				$fdata["Index"]= 6;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatabrcs["designation"]=$fdata;
//	office_address
	$fdata = array();
	$fdata["strName"] = "office_address";
	$fdata["ownerTable"] = "brcs";
		$fdata["Label"]="Office Address"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "office_address";
	
		$fdata["FullName"]= "office_address";
	
		
		
		
		
		
				$fdata["Index"]= 7;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatabrcs["office_address"]=$fdata;
//	residential_address
	$fdata = array();
	$fdata["strName"] = "residential_address";
	$fdata["ownerTable"] = "brcs";
		$fdata["Label"]="Residential Address"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "residential_address";
	
		$fdata["FullName"]= "residential_address";
	
		
		
		
		
		
				$fdata["Index"]= 8;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatabrcs["residential_address"]=$fdata;
//	place
	$fdata = array();
	$fdata["strName"] = "place";
	$fdata["ownerTable"] = "brcs";
		$fdata["Label"]="Place"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="city_name";
				$fdata["LookupTable"]="cities";
	$fdata["LookupOrderBy"]="city_name";
																$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "place";
	
		$fdata["FullName"]= "place";
	
		
		
		
		
		
				$fdata["Index"]= 9;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatabrcs["place"]=$fdata;
//	brc_date
	$fdata = array();
	$fdata["strName"] = "brc_date";
	$fdata["ownerTable"] = "brcs";
		$fdata["Label"]="Date"; 
	
		
		
	$fdata["FieldType"]= 7;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Date";
	$fdata["ViewFormat"]= "Short Date";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "brc_date";
	
		$fdata["FullName"]= "brc_date";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 10;
		$fdata["DateEditType"] = 13; 
	$fdata["InitialYearFactor"] = 100; 
	$fdata["LastYearFactor"] = 10; 
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatabrcs["brc_date"]=$fdata;
//	ref_id
	$fdata = array();
	$fdata["strName"] = "ref_id";
	$fdata["ownerTable"] = "brcs";
		$fdata["Label"]="Ref Id"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
	$fdata["autoCompleteFields"][] = array('masterF'=>"account_id", 'lookupF'=>"account_id");
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="commercial_invoice_no";
				$fdata["LookupTable"]="commercial_invoices";
	$fdata["LookupOrderBy"]="commercial_invoice_no";
																			
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "ref_id";
	
		$fdata["FullName"]= "ref_id";
	
		
		
		
		
		
				$fdata["Index"]= 11;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatabrcs["ref_id"]=$fdata;
//	bank_address
	$fdata = array();
	$fdata["strName"] = "bank_address";
	$fdata["ownerTable"] = "";
		$fdata["Label"]="Bank Address"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "bank_address";
	
		$fdata["FullName"]= "\"\"";
	
		
		
		
		
		
				$fdata["Index"]= 12;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatabrcs["bank_address"]=$fdata;
//	account_address
	$fdata = array();
	$fdata["strName"] = "account_address";
	$fdata["ownerTable"] = "";
		$fdata["Label"]="Account Address"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "account_address";
	
		$fdata["FullName"]= "\"\"";
	
		
		
		
		
		
				$fdata["Index"]= 13;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatabrcs["account_address"]=$fdata;
//	ra_address
	$fdata = array();
	$fdata["strName"] = "ra_address";
	$fdata["ownerTable"] = "";
		$fdata["Label"]="Regional Authority Address"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "ra_address";
	
		$fdata["FullName"]= "\"\"";
	
		
		
		
		
		
				$fdata["Index"]= 14;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatabrcs["ra_address"]=$fdata;

	
$tables_data["brcs"]=&$tdatabrcs;
$field_labels["brcs"] = &$fieldLabelsbrcs;
$fieldToolTips["brcs"] = &$fieldToolTipsbrcs;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["brcs"] = array();
$dIndex = 1-1;
			$strOriginalDetailsTable="brc_items";
	$detailsTablesData["brcs"][$dIndex] = array(
		  "dDataSourceTable"=>"brc_items"
		, "dOriginalTable"=>$strOriginalDetailsTable
		, "dShortTable"=>"brc_items"
		, "masterKeys"=>array()
		, "detailKeys"=>array()
		, "dispChildCount"=> "1"
		, "hideChild"=>"0"
		, "sqlHead"=>"SELECT id,   brc_id,   invoice_no,   invoice_date,   custom_no,   custom_date,   description,   blrawb_no,   blrawb_date,   country_id,   bill_amount,   currency_id,   freight_amount,   insurance_amount,   freely_convertable,   fob,   realisation_date,   sdf_form_no,   remarks"	
		, "sqlFrom"=>"FROM brc_items"	
		, "sqlWhere"=>""
		, "sqlTail"=>""
		, "groupBy"=>"0"
		, "previewOnList" => 1
		, "previewOnAdd" => 1
		, "previewOnEdit" => 1
		, "previewOnView" => 1
	);	
		$detailsTablesData["brcs"][$dIndex]["masterKeys"][]="id";
		$detailsTablesData["brcs"][$dIndex]["detailKeys"][]="brc_id";


	
// tables which are master tables for current table (detail)
$masterTablesData["brcs"] = array();

$mIndex = 1-1;
			$strOriginalDetailsTable="cities";
	$masterTablesData["brcs"][$mIndex] = array(
		  "mDataSourceTable"=>"cities"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "cities"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "1"
		, "hideChild" => "0"	
		, "dispInfo" => "1"								
		, "previewOnList" => 1
		, "previewOnAdd" => 0
		, "previewOnEdit" => 0
		, "previewOnView" => 0
	);	
		$masterTablesData["brcs"][$mIndex]["masterKeys"][]="id";
		$masterTablesData["brcs"][$mIndex]["detailKeys"][]="place";

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "id,  bank_id,  account_id,  ra_id,  signature,  designation,  office_address,  residential_address,  place,  brc_date,  ref_id,  \"\" AS bank_address,  \"\" AS account_address,  \"\" AS ra_address";
$proto0["m_strFrom"] = "FROM brcs";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "";
$proto0["m_strTail"] = "";
$proto1=array();
$proto1["m_sql"] = "";
$proto1["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto1["m_column"]=$obj;
$proto1["m_contained"] = array();
$proto1["m_strCase"] = "";
$proto1["m_havingmode"] = "0";
$proto1["m_inBrackets"] = "0";
$proto1["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto1);

$proto0["m_where"] = $obj;
$proto3=array();
$proto3["m_sql"] = "";
$proto3["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto3["m_column"]=$obj;
$proto3["m_contained"] = array();
$proto3["m_strCase"] = "";
$proto3["m_havingmode"] = "0";
$proto3["m_inBrackets"] = "0";
$proto3["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto3);

$proto0["m_having"] = $obj;
$proto0["m_fieldlist"] = array();
						$proto5=array();
			$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "brcs"
));

$proto5["m_expr"]=$obj;
$proto5["m_alias"] = "";
$obj = new SQLFieldListItem($proto5);

$proto0["m_fieldlist"][]=$obj;
						$proto7=array();
			$obj = new SQLField(array(
	"m_strName" => "bank_id",
	"m_strTable" => "brcs"
));

$proto7["m_expr"]=$obj;
$proto7["m_alias"] = "";
$obj = new SQLFieldListItem($proto7);

$proto0["m_fieldlist"][]=$obj;
						$proto9=array();
			$obj = new SQLField(array(
	"m_strName" => "account_id",
	"m_strTable" => "brcs"
));

$proto9["m_expr"]=$obj;
$proto9["m_alias"] = "";
$obj = new SQLFieldListItem($proto9);

$proto0["m_fieldlist"][]=$obj;
						$proto11=array();
			$obj = new SQLField(array(
	"m_strName" => "ra_id",
	"m_strTable" => "brcs"
));

$proto11["m_expr"]=$obj;
$proto11["m_alias"] = "";
$obj = new SQLFieldListItem($proto11);

$proto0["m_fieldlist"][]=$obj;
						$proto13=array();
			$obj = new SQLField(array(
	"m_strName" => "signature",
	"m_strTable" => "brcs"
));

$proto13["m_expr"]=$obj;
$proto13["m_alias"] = "";
$obj = new SQLFieldListItem($proto13);

$proto0["m_fieldlist"][]=$obj;
						$proto15=array();
			$obj = new SQLField(array(
	"m_strName" => "designation",
	"m_strTable" => "brcs"
));

$proto15["m_expr"]=$obj;
$proto15["m_alias"] = "";
$obj = new SQLFieldListItem($proto15);

$proto0["m_fieldlist"][]=$obj;
						$proto17=array();
			$obj = new SQLField(array(
	"m_strName" => "office_address",
	"m_strTable" => "brcs"
));

$proto17["m_expr"]=$obj;
$proto17["m_alias"] = "";
$obj = new SQLFieldListItem($proto17);

$proto0["m_fieldlist"][]=$obj;
						$proto19=array();
			$obj = new SQLField(array(
	"m_strName" => "residential_address",
	"m_strTable" => "brcs"
));

$proto19["m_expr"]=$obj;
$proto19["m_alias"] = "";
$obj = new SQLFieldListItem($proto19);

$proto0["m_fieldlist"][]=$obj;
						$proto21=array();
			$obj = new SQLField(array(
	"m_strName" => "place",
	"m_strTable" => "brcs"
));

$proto21["m_expr"]=$obj;
$proto21["m_alias"] = "";
$obj = new SQLFieldListItem($proto21);

$proto0["m_fieldlist"][]=$obj;
						$proto23=array();
			$obj = new SQLField(array(
	"m_strName" => "brc_date",
	"m_strTable" => "brcs"
));

$proto23["m_expr"]=$obj;
$proto23["m_alias"] = "";
$obj = new SQLFieldListItem($proto23);

$proto0["m_fieldlist"][]=$obj;
						$proto25=array();
			$obj = new SQLField(array(
	"m_strName" => "ref_id",
	"m_strTable" => "brcs"
));

$proto25["m_expr"]=$obj;
$proto25["m_alias"] = "";
$obj = new SQLFieldListItem($proto25);

$proto0["m_fieldlist"][]=$obj;
						$proto27=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "\"\""
));

$proto27["m_expr"]=$obj;
$proto27["m_alias"] = "bank_address";
$obj = new SQLFieldListItem($proto27);

$proto0["m_fieldlist"][]=$obj;
						$proto29=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "\"\""
));

$proto29["m_expr"]=$obj;
$proto29["m_alias"] = "account_address";
$obj = new SQLFieldListItem($proto29);

$proto0["m_fieldlist"][]=$obj;
						$proto31=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "\"\""
));

$proto31["m_expr"]=$obj;
$proto31["m_alias"] = "ra_address";
$obj = new SQLFieldListItem($proto31);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto33=array();
$proto33["m_link"] = "SQLL_MAIN";
			$proto34=array();
$proto34["m_strName"] = "brcs";
$proto34["m_columns"] = array();
$proto34["m_columns"][] = "id";
$proto34["m_columns"][] = "bank_id";
$proto34["m_columns"][] = "account_id";
$proto34["m_columns"][] = "ra_id";
$proto34["m_columns"][] = "signature";
$proto34["m_columns"][] = "designation";
$proto34["m_columns"][] = "office_address";
$proto34["m_columns"][] = "residential_address";
$proto34["m_columns"][] = "place";
$proto34["m_columns"][] = "brc_date";
$proto34["m_columns"][] = "ref_id";
$obj = new SQLTable($proto34);

$proto33["m_table"] = $obj;
$proto33["m_alias"] = "";
$proto35=array();
$proto35["m_sql"] = "";
$proto35["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto35["m_column"]=$obj;
$proto35["m_contained"] = array();
$proto35["m_strCase"] = "";
$proto35["m_havingmode"] = "0";
$proto35["m_inBrackets"] = "0";
$proto35["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto35);

$proto33["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto33);

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
$proto0["m_orderby"] = array();
$obj = new SQLQuery($proto0);

$queryData_brcs = $obj;
$tdatabrcs[".sqlquery"] = $queryData_brcs;

include(getabspath("include/brcs_events.php"));
$tableEvents["brcs"] = new eventclass_brcs;

?>
